In software development projects, software developers often conduct performance optimization analysis or memory leak tests, which require detailed analysis of the source code function or segments of the source code. To identify bugs or provide guidance for further optimization, software developers often use monitoring programs to record the time consumption, storage consumption, central processing unit (CPU) consumption, etc., caused by certain functions or segments of source code. Software developers often use plugins to test or analyze the source code file.
A plugin refers to one or more software programs that can be placed into the source code without compromising the logical integrity of the source code. When the source code is being executed, the plugin code may output certain characteristic data related to the execution of the source code program. Software developers may then analyze and test the source code based on the output generated by the plugin code.
Very often, plugins are placed into the source code in the original compilation process. That is, depending on the build environment, a software developer may place a plugin into the source code and compile the code to obtain executable files. This process often requires the developer to analyze the whole source code file. When dealing with a large-scale program, this approach may require a considerable amount of work and may therefore be inefficient. In addition, when the source code with the plugins is compiled to generate executable files, the source code may not be further modified. This limits the flexibility in processing source code files.
The disclosed method and system are directed to solve one or more problems set forth above as well as other problems.